package com.jiantong.lawEnforcing.enums;

/**
 * 状态: 0,暂存(未规定案件类型); 1,已经得到指派; 2,登记成功(当场处罚); 3,登记成功(立案审批表);
 * Created by mz03 on 2017/8/29.
 */
public enum LawCasesType {
    EMPTY(0,"未选类型"),
    SIMPLENESS_CASES(1,"登记为当场处罚"),
    CASES_CHECK(2,"登记为立案审批");
    private final Integer value;
    private final String description;

    LawCasesType(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static LawCasesType from(Integer value) {
        for (LawCasesType lawCasesStatus : LawCasesType.values()) {
            if (lawCasesStatus.value == value) {
                return lawCasesStatus;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
